import * as ActionTypes from './actionTypes';
import { OpenedMenu, MenuItem } from '../../types/menu';
export const addOpenedMenu = (menuItem: OpenedMenu) => ({
  type: ActionTypes.ADDOPENTMENU,
  menuItem,
});
export const setUserMenu = (list: MenuItem[]) => ({
  type: ActionTypes.SET_USERMENU,
  list,
});
export const setBackRoute = (backRoute: MenuItem[]) => ({
  type: ActionTypes.SET_BACKROUTE,
  backRoute,
});
export const setOpenKey = (keys: string[]) => ({
  type: ActionTypes.SET_OPENKEY,
  keys,
});
export const setselectMenuKey = (keys: string[]) => ({
  type: ActionTypes.SET_SELECTKEY,
  keys,
});

export const setCurrentPath = (path: string) => ({
  type: ActionTypes.SETCURRENTPATH,
  path,
});

export const filterOpenKey = (menuItemArr: OpenedMenu[]) => ({
  type: ActionTypes.FILTER_OPENKEY,
  menuItemArr,
});

export const setCurrenFull = (CurrenFull: boolean) => ({
  type: ActionTypes.SETCURRENFULL,
  CurrenFull,
});
